home *** CD-ROM | disk | FTP | other *** search
/ Commodore 64 Scene Diskmags Assortment / Commodore_CEE_Vol._1_Issue_05_1995_Jack_Vander_White_Disk_1_of_3_Side_A.d64 / reply doc 3 < prev    next >
Text File  |  2023-02-26  |  8KB  |  176 lines

  1.  MERGING TEXT FILES
  2.  
  3.  Here's how you do it...load the first file and place the cursor past the last
  4.  line in the file (in the edit mode). Press the STOP key to take you back to
  5.  the menu and load the second file. The second file will start loading from
  6.  the line you left the cursor on when you went to the menu. Armed with that
  7.  information, one could merge (or insert) text from one file into another just
  8.  by leaving the cursor in the appropriate place in the text. You can even do
  9.  a "cut and paste" operation by opening up a gap in your text with CTRL i and
  10.  merging text from another file into the gap.
  11.  
  12.  
  13.  PRINTING A FILE
  14.  
  15.  A bit of background on the editor's printing routine will help you get it set
  16.  up for your particular printer. First, let's follow the printing prompts.
  17.  
  18.  You will be prompted first for the place to start printing (from the
  19.  beginning line or from the last line the cursor was on).
  20.  
  21.  Next, right justification instructions. Right justification will happen only
  22.  on lines with 10 or less spaces at the end of the line, and only if the line
  23.  has at least 4 words on it (formatting safety precautions). These precautions
  24.  are necessary to prevent "ugly" lines with 4 or more spaces between words.
  25.  
  26.  Next prompt is for enhanced print (user-defined...more on this later).
  27.  
  28.  Next is linked printing prompt. This is for documents too big to fit into the
  29.  workspace all at once, and had to be saved in two or more files. Answering
  30.  "yes" to this prompt will cause the line counter to remember the number of
  31.  the last line it printed (so that it can page properly on a linked document).
  32.  For example, let's say you wanted to print a large document that was saved in
  33.  three files. On the first file, you would answer "no" to the prompt, but on
  34.  each of the next files, answer "y".
  35.  
  36.  Next prompt is for the number of copies you want. This prompt will not be
  37.  offered if you answered "y" to the linked printing prompt.
  38.  
  39.  The last prompt gives you a chance to abort printing before it starts.
  40.  Answering yes will start printing. You can stop printing (if you have to)
  41.  with the STOP key at any time. If you do, you'll be returned to the editor's
  42.  menu screen.
  43.  
  44.  TECHNICAL INFO
  45.  
  46.  Two files are opened to the printer. One file is used to send commands, the
  47.  other is for text. Most non-CBM printer/interface setups allow the option of
  48.  choosing secondary addresses...usually, a secondary address of 7 is used for
  49.  upper and lower case printing, and allows conversion of PETascii to standard
  50.  ascii when sending text. Also, you can usually choose a secondary address for
  51.  what is commonly called a "transparent" mode (sending data without any
  52.  translation). On CARDCO interfaces this is 4 or 5. The editor's printing
  53.  routine is set to open files of 7,4,7 (text) and 5,4,5 (commands). The
  54.  transparent mode was chosen for commands so that you don't have to worry
  55.  about them being translated into something else on the way to the printer.
  56.  Saves a lot of confusion and weird printer antics. One rule here...you must
  57.  use different file numbers for text and command files (how to choose them
  58.  later).
  59.  
  60.  The first thing the printing routine will do is send a "setup" string to your
  61.  printer. A setup string is a string of codes that one would usually use to
  62.  ensure the printer is set to all default conditions, or to make certain
  63.  special functions are set the way you want them to be. This string should
  64.  also contain the codes to disable enhanced print and underlining. You can
  65.  define this string (instructions in a moment).
  66.  
  67.  Then, if you selected enhanced print, another string is sent. These are
  68.  usually the codes that enable boldface print, italics, or whatever other
  69.  feature you wish to define as enhanced print.
  70.  
  71.  Next, the document is printed. Depending on how you answered the printer
  72.  prompts, you could right-justify the lines, print the document in boldface,
  73.  or both at once.
  74.  
  75.  SETTING UP THE STRINGS
  76.  
  77.  There are 4 strings you will have to define according to your individual
  78.  printer/interface setup. The printing routine will work if you don't, but all
  79.  strings will be sent as null strings unless you define them. This means that
  80.  your printer cannot underline or do enhanced printing as commanded from the
  81.  printing routine until you define the command strings.
  82.  
  83.  The command strings are stored in a table as a series of bytes. Let's take
  84.  the setup string first (example is in decimal).
  85.  
  86.  byte1 byte2 byte3 byte4 byte5 byte6
  87.  
  88.   2     27    64    --    --    --
  89.  
  90.  The codes for my printer to clear to all default values are 27 and 64. The
  91.  first byte in the setup string (byte1) should be the length of the string.
  92.  Then the actual codes should follow in the succeeding bytes. The setup string
  93.  can contain up to 32 bytes (length byte + 31 codes). If you had a string to
  94.  send like this... 27,64,27,45,27,88,27,92...the table should look like this:
  95.  
  96.  8  27  64  27  45  27  88  27  92
  97.  
  98.  The next string in the table contains the enhanced printing codes. These
  99.  codes can be for whatever you want to use for enhanced printing (boldface,
  100.  italics, shadow print, etc.). Same rules as in the setup string, but the
  101.  maximum string length is 16 bytes.
  102.  
  103.  The third string is for enabling underlining. 16 bytes max.
  104.  
  105.  The last string is for disabling underlining. 16 bytes max.
  106.  
  107.  DEFINING THE FILES/SECONDARY ADDRESSES
  108.  
  109.  The editor is defaulted to use a secondary address of 7 (in the file opening
  110.  command "open 7,4,7") for text. This will cause the printer/interface (in my
  111.  case) to expect CBM ascii (upper and lower case), and will perform a carriage
  112.  return and linefeed when it receives a carriage return. If you need a
  113.  different secondary address for this to happen with your printer, you should
  114.  reset this number to the value you need.
  115.  
  116.  5 is the default secondary address for the command file (open 5,4,5). This is
  117.  the file that the editor uses to send command strings to the printer. No
  118.  translation of the codes should take place through this file. Carriage
  119.  returns will not be sent, so it doesn't matter if this address causes a
  120.  carriage/linefeed when it gets a carriage return...it'll never get one, just
  121.  escape codes/command strings.
  122.  
  123.  If you want to communicate with your printer in standard ascii, all you have
  124.  to do is change a flag (details soon). When you set the flag for ascii, the
  125.  editor will also send a linefeed after each carriage return. Example:
  126.  
  127.  For a CARDCO interface and Prowriter 8510 printer, if you want to communicate
  128.  in standard ascii, set the ascii flag to 0, the secondary address for text to
  129.  5 (transparent mode, no linefeed) and the secondary address for commands to
  130.  4 (transparent mode, linefeed doesn't matter).
  131.  
  132.  Note that although both files are transparent mode, I chose different
  133.  addresses for text and command files. This is because the secondary address
  134.  number is also used as the file number. If the numbers were the same, the
  135.  editor would try to open the same file twice, and terminate with an error
  136.  message whenever you tried to print.
  137.  
  138.  MODIFYING THE EDITOR CODES/STRINGS
  139.  
  140.  Load the wedge, but don't run it. Now you can poke the changes into the
  141.  tables and resave the new wedge. Here are the locations you will need:
  142.  
  143.  
  144.  
  145.                           HEX    DECIMAL
  146.  
  147.  Ascii/ CBMascii flag -> $117c   4476  (zero for ascii, 255 for CBM)
  148.  
  149.  Text file #          -> $1347   4935
  150.  
  151.  Command file #       -> $134b   4939
  152.  
  153.  Setup string         -> $2436   9270 to 9301
  154.  
  155.  Enhanced string      -> $2456   9302 to 9317
  156.  
  157.  Underline "on" string-> $2466   9318 to 9333
  158.  
  159.  U/l "off" string     -> $2476   9334 to 9349
  160.  
  161.  
  162.  You can make the changes with an ML monitor, or poke them in from basic.
  163.  Either way, it may help to make up a chart to aid you in making the changes.
  164.  
  165.  Also, never set the length byte of any of the 4 command strings to zero, or
  166.  you'll get very strange results. If you want the editor to ignore the string,
  167.  set the first byte to 1 and the second to zero. All 4 strings are set this
  168.  way initially anyway, ready for you to redefine them.
  169.  
  170.  
  171.  Well, that's about it.
  172.  
  173. -----------------------------------
  174.  
  175.  
  176.